<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/token.jsp"%>
<%@ include file="group.jsp"%>
<%
    String id = input.getDesc("group_id", "-1");
    List<DoctorGroup> list = QBuilder.db("basedb").select().from("DoctorGroup").where(new Where("id=", id).and("status=", STATUS_ENABLE).and("hospital=", hospital)).query().getResultObj();
    if (isEmpty(list)) {
        msg = new Message(30041, "该分组不存在");
        Tools.encryptPrint(out, msg);
        return;
    }
    DoctorGroup dg = list.get(0);
    dg.setStatus(STATUS_DISABLE);
    DBTools.db("basedb").modItem(dg, dg.getId());
    DoctorGroup doctorGroup = DoctorGroup.fromMap(parameters, DoctorGroup.class);
    doctorGroup.setDoctorUid(token.getUid());
    Tools.encryptPrint(out, queryGroup(doctorGroup));
%>
